package com.cnhis.cloudhealth.clinical.util;

public class GlobalUtil {

	public static Object null2def(Object object, String string) {
		if(object==null)
		return string;
		else
			return object.toString();
	}
	
	
	/**
	 * tomcat.getServer().await();
	 * @param heartbeat_str
	 */
		public static void heartbeatRecycle(String heartbeat_str) {
			while (true) {
				try {
					int millis_heatbeat_time = 7000;  //human is 70 per minute
					Thread.sleep(millis_heatbeat_time);
					
					System.out.println(heartbeat_str);
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				System.out.println("---ok");
			}
		}

}
